Module 1: Responsible AI with GitHub Copilot
Duration: 15 min | XP: 600 | Units: 5 URL: https://learn.microsoft.com/en-us/training/modules/responsible-ai-with-github-copilot/
Overview
This module explores the responsible use of AI in the context of GitHub Copilot, a generative AI tool for developers. It equips you with the knowledge and skills to use Copilot effectively while mitigating potential ethical and operational risks associated with AI usage.
Learning Objectives
By the end of this module, you'll be able to:
- Understand and apply the principles of Responsible AI usage.
- Identify limitations and mitigate risks associated with AI.
- Learn best practices for ensuring AI-generated code aligns with ethical standards and project-specific requirements.
- Recognize the importance of transparency and accountability in AI systems in building trust and maintaining user confidence.
Prerequisites
A basic understanding of generative AI.
Unit 1: Introduction (3 min)
This module explores the responsible use of AI in the context of GitHub Copilot, a generative AI tool for developers. It equips you with the knowledge and skills to use Copilot effectively while mitigating potential ethical and operational risks associated with AI usage.
Unit 2: Mitigate AI Risks (3 min)
The Challenge
Artificial Intelligence (AI) presents numerous opportunities for innovation and efficiency, but it also comes with significant risks that need to be carefully managed.
One of the primary concerns is that AI systems can sometimes make decisions that are difficult to interpret, leading to a lack of transparency and accountability. Additionally, AI can result in unintended and harmful outcomes, such as biased decision-making or privacy violations.
To mitigate these risks, it is essential to implement robust governance frameworks, ensure transparency in AI processes, and incorporate human oversight. By doing so, organizations can harness the benefits of AI while minimizing potential negative impacts.
What is Responsible AI?
Responsible AI is an approach to developing, assessing, and deploying artificial intelligent systems in a safe, trustworthy, and ethical way. AI systems are the product of many decisions made by the people who develop and deploy them. From system purpose to how people interact with AI systems, Responsible AI can help proactively guide these decisions toward more beneficial and equitable outcomes. That means keeping people and their goals at the center of system design decisions and respecting enduring values like fairness, reliability, and transparency.
Unit 3: Microsoft and GitHub's Six Principles of Responsible AI (3 min)
Microsoft is a global leader in Responsible AI, identifying six key principles that should guide AI development and usage:
- Fairness
- Reliability and Safety
- Privacy and Security
- Inclusiveness
- Transparency
- Accountability
1. Fairness: AI systems should treat all people fairly
AI systems should treat everyone fairly, avoiding differential impacts on similarly situated groups. In contexts like medical treatment, loan applications, or employment, AI should provide consistent recommendations to individuals with similar symptoms, financial situations, or qualifications.
Techniques to detect bias and mitigate unfair impacts:
- Reviewing training data.
- Testing models with balanced demographic samples.
- Using adversarial debiasing.
- Monitoring model performance across user segments.
- Implementing controls to override unfair model scores.
2. Reliability and Safety: AI systems should perform reliably and safely
To build trust, AI systems must operate reliably, safely, and consistently. These systems need to function as designed, respond safely to unexpected conditions, and resist harmful manipulation.
- Safety refers to minimizing unintended harm, including physical, emotional, and financial harm to individuals and societies.
- Reliability means that AI systems perform consistently as intended without unwanted variability or errors.
3. Privacy and Security: AI systems should be secure and respect privacy
Key points:
- Consent: Getting users' permission before collecting their data. Clearly explain how the AI uses their data and get their consent. Don't collect data secretly. Let users choose if they want to share personal data and inform them through clear prompts and policies.
- Data minimization: Collecting only the data needed for the AI to work. Avoid gathering extra information and remove sensitive data once the AI is in use.
- Anonymization: Use methods like pseudonymization and aggregation to protect identities.
Encryption: Encrypt sensitive data both during transfer and when stored using:
- Hardware Security Modules (HSMs) — store keys in a tamper-proof environment.
- Secure vaults like Microsoft Azure for key storage with controlled access.
- Envelope encryption — uses two keys for added security.
4. Inclusiveness: AI systems should empower everyone and engage people
Inclusiveness means ensuring that AI systems are fair, accessible, and empower everyone. Microsoft's Responsible AI standard recognizes that AI creators must proactively design AI to include all people, communities, and geographies — especially those areas of society historically underrepresented.
Requirements:
- AI systems work well for diverse users and groups.
- AI systems are accessible regardless of physical or mental abilities.
- AI systems are available worldwide, even in developing countries/regions.
- People from different backgrounds provide input into AI system development.
- Alternative modes of interaction: voice control, captions, screen readers.
- Support for different languages and local cultural contexts.
- Works offline and with limited connectivity.
5. Transparency: AI systems should be understandable
AI creators should:
- Explain how their systems operate clearly through a clear validation framework.
- Justify the design choices behind AI systems.
- Be honest about the capabilities and limitations of AI systems.
- Enable auditability with logging, reporting, and auditing capabilities.
6. Accountability: People should be accountable for AI systems
AI creators should be responsible for how their systems operate. They need to continuously monitor system performance and mitigate risks. Companies deploying AI systems must take responsibility for their operation.
Unit 4: Module Assessment (3 min)
Check Your Knowledge
Q1: What is the primary goal of Responsible AI?
- ❌ To maximize profits from AI systems.
- ❌ To develop AI systems as quickly as possible.
- ✅ To ensure AI systems are safe, trustworthy, and ethical.
- ❌ To replace human decision-making with AI.
Q2: Which principle is NOT one of the six identified by Microsoft for Responsible AI?
- ❌ Fairness.
- ✅ Innovation. (Not one of the six principles)
- ❌ Inclusiveness.
- ❌ Accountability.
Q3: What does the principle of Fairness in Responsible AI emphasize?
- ❌ Maximizing AI performance at all costs.
- ✅ Ensuring AI systems perform equally well across all demographic groups.
- ❌ Prioritizing profitability over ethical concerns.
- ❌ Creating AI systems that are easy to understand.
Q4: How does Microsoft address potential biases in AI systems?
- ❌ By ignoring the issue and focusing on other areas.
- ❌ By providing AI systems with more data.
- ✅ By reviewing training data, testing with balanced samples, and using adversarial debiasing.
- ❌ By allowing users to modify AI system outputs directly.
Q5: What is the role of transparency in Microsoft's Responsible AI principles?
- ❌ To keep AI operations secret from the public.
- ✅ To make AI systems' operations and decisions understandable and clear.
- ❌ To hide the limitations of AI systems.
- ❌ To prioritize efficiency over ethical considerations.
Q6: Why is it important for developers to closely scrutinize AI-generated code?
- ❌ To reduce development time.
- ✅ To ensure that the code aligns with project-specific conventions and requirements.
- ❌ To enhance the creative aspect of coding.
- ❌ To automatically improve system performance.
Unit 5: Summary (3 min)
Key Takeaways
Six core principles guide Microsoft and GitHub's approach to Responsible AI:
- Fairness
- Reliability and Safety
- Privacy and Security
- Inclusiveness
- Transparency
- Accountability
Recap
In this module, we covered:
- Understand and apply the principles of Responsible AI usage.
- Identify limitations and mitigate risks associated with AI.
- Learn best practices for ensuring AI-generated code aligns with ethical standards and project-specific requirements.
- Recognize the importance of transparency and accountability in AI systems for building trust and maintaining user confidence.